import Layout from '@/layout/index.vue'

export default {
  path: '/play-manage',
  name: 'PlayManage',
  meta: { title: '操作管理' },
  component: Layout,
  children: [
    {
      path: 'play-tool',
      name: 'playTool',
      meta: {
        title: '操作工具',
        // componentName: 'playTool',
        // keepAlive: ['playToolDetails'],
      },
      component: () => import('@/views/play-manage/play-tool/index.vue'),
    },
    {
      path: 'play-tool-details',
      name: 'playToolDetails',
      meta: {
        title: '操作工具详情',
      },
      component: () => import('@/views/play-manage/play-tool/details.vue'),
    },
    {
      path: 'play-job',
      name: 'PlayJob',
      meta: {
        title: '操作任务',
        // componentName: 'PlayJob',
        // keepAlive: ['CreatePlayJob', 'CreateSchedule', 'PlayHistoryDetail'],
      },
      component: () => import('@/views/task-manage/play-job/index.vue'),
    },
    {
      path: 'play-history-pages',
      name: 'PlayHistoryPages',
      meta: {
        title: '操作任务执行历史',
        hidden: true,
        componentName: 'PlayHistoryPages',
        keepAlive: ['PlayHistoryDetail'],
      },
      component: () =>
        import('@/views/task-manage/play-job/PlayHistoryPages.vue'),
    },
    {
      path: 'create-play-job',
      name: 'CreatePlayJob',
      meta: {
        title: '编辑操作任务',
        componentName: 'CreatePlayJob',
        keepAlive: ['playToolDetails'],
      },
      component: () =>
        import('@/views/task-manage/play-job/component/CreateJob.vue'),
    },
    {
      path: 'play-schedule',
      name: 'PlaySchedule',
      meta: {
        title: '操作计划',
        // componentName: 'PlaySchedule',
        // keepAlive: ['CreateSchedule'],
      },
      component: () => import('@/views/task-manage/play-schedule/index.vue'),
    },
    {
      path: 'create-schedule',
      name: 'CreateSchedule',
      meta: {
        title: '创建操作计划',
        hidden: true,
        componentName: 'CreateSchedule',
        keepAlive: ['CreatePlayJob'],
      },
      component: () =>
        import(
          '@/views/task-manage/play-schedule/component/CreateSchedule.vue'
        ),
    },
    {
      path: 'play-job-history',
      name: 'PlayHistory',
      meta: {
        title: '操作历史',
        // componentName: 'PlayHistory',
        // keepAlive: ['PlayHistoryDetail'],
      },
      component: () => import('@/views/task-manage/play-history/index.vue'),
    },
    {
      path: 'play-history-detail',
      name: 'PlayHistoryDetail',
      meta: { title: '执行历史详情' },
      component: () =>
        import('@/views/task-manage/play-history/HistoryDetail.vue'),
    },
  ],
}
